<script>
  import $ from 'dfish-widget'
  import Method from '../Method.vue'

  export default {
    mixins: [Method],
    data() {
      return {
        name: '$.print(target, [options])',
        remark: '打印组件。',
        attrs: [{
          name: 'target',
          remark: '打印目标组件',
          type: 'Widget',
        }, {
          name: 'options',
          remark: '打印参数',
          type: 'Object',
          attrs: [{
            name: 'print',
            remark: '是否立即打印，默认为true',
            type: 'Boolean',
          }, {
            name: 'head',
            remark: '放在打印页<head>标签内的内容',
            type: 'String',
          }, {
            name: 'input2text',
            remark: '是否把表单转为纯文本显示',
            type: 'Boolean',
          }]
        }],
        examples: [{
          remark: '打印表单',
          code: `
            $.print(this.$refs.form, {input2text: true});
            `
        }]
      }
    }
  }
</script>
